<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改类别</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="css/main.css">
    <script src="layui/layui.js"></script>
    <script src="js/jquery-1.9.1.min.js"></script>
</head>
<body>
<div class="layui-fluid">
    <form class="layui-form" action="" method="post">
        <div class="layui-form-item" style="margin-top: 10px">
            <label class="layui-form-label">类别名称：</label>
            <div class="layui-input-inline">
                <input type="text" name="cName" value="<?=$row['cName']?>" placeholder="请输入类别名称" autocomplete="off"
                       class="layui-input">

            </div>
        </div>
        <div class="layui-form-item" style="margin-top: 10px">
            <label class="layui-form-label">父类：</label>
            <div class="layui-input-inline">
                <select name="pid" required lay-verify="required" lay-filter="lanmu">
                    <option value="">请选择父类</option>
                    <option value="0"
                    <?=$row['pid']=="0"?"selected":""?>>作为一级栏目</option>
                    <?php
                    foreach($cateArr as $v){?>
                    <option value="<?=$v['id']?>"
                    <?=$v['id']==$row['pid']?"selected":""?> ><?=$v['cName'] ?></option>
                    <?php }?>
                </select>
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">确认修改</button>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['form'], function () {
        var form = layer.form;
    });
    $(function () {
        $('#righttitle', window.parent.document).text($('title').text());
    });
</script>
</body>
</html>